<%@ page language="java"
	import="com.google.appengine.api.users.*"
	import="jp.bluecab.bluecabsystem.common.*"
	import="jp.bluecab.bluecabsystem.locrecserv.classes.*"
	import="javax.jdo.*"
	import="java.util.*"
	contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	UserService userService = UserServiceFactory.getUserService();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Admin - BLUECabSystem</title>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
	<link href="/css/locrecserv.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
	<div id="logo">
		<h1><a href="#">BLUE Cab GPS System</a></h1>
	</div>
	<div id="menu">
		<ul>
			<div align="right">
				<a href="/location/index.jsp">メインに戻る</a>
				<a href="<%=userService.createLogoutURL("/")%>">Logout</a>
			</div>
		</ul>
	</div>
</div>
<div id="wrapper">
	<div id="page">
		<div id="content">
			<div class="post">
				<div class="entry">
					<h1>管理画面</h1>
<%
			        PersistenceManager pm = PMF.get().getPersistenceManager();
			        Query pmquery = pm.newQuery(LocRecUser.class);
        			pmquery.setOrdering("createdAt");
        			List<LocRecUser> results = (List<LocRecUser>)pmquery.execute();
%>
				<table>
					<tr>
						<th>ログインID</th>
						<th>E-mail</th>
						<th>登録日時</th>
					</tr>
				<% for(LocRecUser user : results) { %>
					<tr>
						<td width="150"><%= user.getLoginId() %></td>
						<td width="150"><%= user.getEmail() %></td>
						<td width="300"><%= user.getCreatedAt() %></td>
					</tr>
					<% } %>
				</table>
				</div>
			</div>
		</div>

		<div id="sidebar"></div>

		<div style="clear: both;">&nbsp;</div>
	</div>
</div>
</body>
</html>
